package jungsun;

import java.util.Scanner;

public class J09Sungjuk {
	//메서드를 이용한 성적처리
	public static void main(String[]args){
		String name[]= new String[2];
		//String kor[]= new String[2];
		int kor=0,eng=0,math=0,tot=0;
		double avg=0;
		char grd=' ';
		Scanner sc = null;
		String result ="";
		//성적 입력
		inputSungJuk(sc,name,kor,eng,math);
		//성적 입력
		getTotal(kor,eng,math,tot);
	    getAvgerage(avg, tot);
	    getGrade(avg,grd);
		//결과출력
		System.out.println(name);//중요
		System.out.println(name[1]);//중요
		
		System.out.println(kor);
		//System.out.println(kor[1]);
		
		System.out.println(eng);
		System.out.println(math);
		System.out.println(tot);
		System.out.println(avg);
		System.out.println(grd);
	}// main
     public static void inputSungJuk(
    	 Scanner sc,String[] name ,int kor,int eng, int math ){
    	 sc=new  Scanner(System.in);
 		System.out.println("이름을 입력하세요");
 		name[1]=sc.next();//이름  입력받음
 		System.out.println("Kor");
 		kor=sc.nextInt();//국어  입력받음
 		System.out.println("eng");
 		eng=sc.nextInt();//영어  입력받
 		System.out.println("math");
 		math=sc.nextInt();//수학  입력받음
 		sc.close();
     }
    	public static void getTotal(
    		int kor,int eng,int math,int tot){
    		tot= kor + eng + math;
    	}	
    		
    	public static void getAvgerage(
    			double avg,int tot){
    		avg=(double)tot/3;
    	}
    	public static void getGrade(
    			double avg,char grd){
    		 switch((int)avg/10){
    		 case 10:
    		 case 9:grd='수';break;
    		 case 8:grd='우';break;
    		 case 7:grd='미';break;
    		 case 6:grd='양';break;
    		 default:grd='가';
    		 }
    	
    	}
}
